package com.qf.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.util.StringUtils;

import java.util.Date;

public class User {
    private Integer userid;
    private String username;
    @JsonIgnore
    private String password;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date registrydate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date lastlogindate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date currentlogindate;
    private String passwordsalt;
    private Long datastatus;


    public boolean isNull() {
        return StringUtils.isEmpty(username) || StringUtils.isEmpty(password);
    }


    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Date getRegistrydate() {
        return registrydate;
    }

    public void setRegistrydate(Date registrydate) {
        this.registrydate = registrydate;
    }

    public Date getLastlogindate() {
        return lastlogindate;
    }

    public void setLastlogindate(Date lastlogindate) {
        this.lastlogindate = lastlogindate;
    }

    public Date getCurrentlogindate() {
        return currentlogindate;
    }

    public void setCurrentlogindate(Date currentlogindate) {
        this.currentlogindate = currentlogindate;
    }

    public String getPasswordsalt() {
        return passwordsalt;
    }

    public void setPasswordsalt(String passwordsalt) {
        this.passwordsalt = passwordsalt;
    }

    public Long getDatastatus() {
        return datastatus;
    }

    public void setDatastatus(Long datastatus) {
        this.datastatus = datastatus;
    }
}
